@import "../global/global";

.ring-avatar-editor {
  position: relative;
  width: $ring-unit*5;
  height: $ring-unit*5;
  text-align: center;
  padding: 1px;

  &:after {
    content: '';
    display: inline-block;
    width: 0;
    height: $ring-unit*5;
    vertical-align: middle;
  }
}

.ring-avatar-editor_right {
  float: right;
}

.ring-avatar-editor:hover:not(:disabled):not(.ring-avatar-editor_controlled) {
  border: 1px solid $ring-link-hover-color;
  padding: 0;

  .ring-avatar-editor__icon {
    visibility: visible;
  }

  .ring-avatar-editor__img {
    outline: 0;
  }

  &:before {
    content: '';

    position: absolute;
    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.8);
  }
}

.ring-avatar-editor__img {
  max-width: $ring-unit*5;
  max-height: $ring-unit*5;
  vertical-align: middle;
  cursor: pointer;
}

.ring-avatar-editor__file-input {
  visibility: hidden;
  position: absolute;
  left: -10000px;
}

.ring-avatar-editor__icon {
  visibility: hidden;
  position: absolute;
  left: 0;
  top: 10px;
  line-height: 14px;
  width: 100%;

  color: #FFF;
}

.ring-avatar-editor__frame {
  cursor: pointer;
  display: inline-block;
  vertical-align: top;
  border: 1px solid $ring-gray-color;
  padding: 0;
}

.ring-avatar-editor__remove {
  display: inline-block;
  vertical-align: top;
  margin-left: 2*$ring-unit;
}
